import threading, time
from threading import Thread
# 继承Thread类
class MyThread(Thread):
    # 重写run方法
    def run (self):
        for i in range(4):
            time.sleep(1)
            print(f'当前线程名称，{threading.current_thread().name}, 这是第几次执行{i}')

if __name__ == '__main__':
    print('parent thread start ...')
    lst = [ MyThread() for i in range(3)]
    for t in lst:
        t.start()
    for t in lst:
        t.join()

    print('parent thread end ...')